import React, { Component,Suspense } from 'react';
import { Route, Switch, Redirect } from "react-router-dom"
import router from "./router"
// import store from './redux/store'
import 'antd-mobile/dist/antd-mobile.css';
import "./App.css"
import "./flexible"

export class App extends Component {

  render() {
    return (
      <div>
        <div>
        <Suspense fallback={'加载中.......'}>
          <Switch>
            {
              router.map((item, i) => <Route
                key={i}
                path={item.path}
               component={item.component}
               ></Route>)
            }
            <Redirect to="/home" />

          </Switch>
          </Suspense>
        </div>
        <div>

        </div>
      </div>
    )
  }
}


export default App



